<?php
/**
 * Created by PhpStorm.
 * User: yanggang
 * Date: 2019/4/18
 * Time: 2:47 PM
 */

namespace app\admin\org;


class AppList
{

    public static function get_list($page,$rows,$keyword='',$status=100){
        $model = new \app\common\model\AppList();
        $where = array();
        if(!empty($keyword))$where['name'] = array('like','%'.$keyword.'%');
        if($status!=100)$where['status'] = $status == 1 ? 1 : 0;
        $list = $model->where($where)->order('id desc')->page($page,$rows)->select();
        $total = $model->where($where)->count('id');
        return array('list'=>$list,'total'=>$total,'rows'=>$rows);
    }
}